﻿@model PSU.Model.Areas.Administrator.Home.BulletinEditViewModel
@using PSU.Model.Areas
@using PSU.Model.Areas.Administrator.Home
@{
    ViewData["Title"] = "编辑公告";
    ViewData["NavTitle"] = "网站公告管理";
    ViewData["CurrName"] = "";
}

@section styles{
    <environment include="Development">
        <link href="~/css/template/simditor.css" rel="stylesheet" />
    </environment>
    <environment exclude="Development">
        <link href="~/css/template/simditor.min.css" rel="stylesheet" asp-append-version="true" />
    </environment>
}

<section class="content-header">
    <h1>
        网站公告
        <small>Site Bulletin</small>
    </h1>
    <ol class="breadcrumb">
        <li>
            <a asp-area="Administrator" asp-controller="Home" asp-action="Index">
                <i class="fa fa-dashboard"></i> 首页
            </a>
        </li>
        <li class="active">
            <a asp-area="Administrator" asp-controller="Home" asp-action="Bulletin">
                网站公告
            </a>
        </li>
        <li class="active">编辑</li>
    </ol>
</section>

<section class="content">
    <div class="row">
        <div class="col-md-12">
            <form class="form-horizontal" role="form" id="edit_form">
                <div class="form-group">
                    <label class="col-md-2 col-xs-3 control-label no-padding-right" for="title"> 公告标题： </label>
                    <div class="col-md-4 col-xs-9">
                        <input class="col-md-5 col-xs-12 form-control" id="title" type="text" maxlength="20" placeholder="" asp-for="Title">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-2 col-xs-3 control-label no-padding-right" for="target"> 针对用户： </label>
                    <div class="col-md-2 col-xs-9">
                        <select id="target" asp-items="@Html.GetEnumSelectList(typeof(EnumType.BulletinTarget))" class="form-control" asp-for="Target"></select>
                    </div>
                    <label class="col-md-2 col-xs-3 control-label no-padding-right" for="type"> 公告类型： </label>
                    <div class="col-md-2 col-xs-9">
                        <select id="type" asp-items="@Html.GetEnumSelectList(typeof(EnumType.BulletinType))" class="form-control" asp-for="Type"></select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-2 col-xs-3 control-label no-padding-right" for="editor"> 公告内容： </label>
                    <div class="col-md-9 col-xs-9">
                        <textarea class="col-md-6" rows="3" id="editor" asp-for="Content" maxlength="1000"></textarea>
                    </div>
                </div>
                <div class="clearfix">
                    <div class="text-left">
                        <a class="btn btn-success col-md-offset-2" id="save" data-id="@Model.Id">
                            <i class="fa fa-check"></i>
                            保存
                        </a>
                        &nbsp;&nbsp;
                        <a class="btn btn-default" asp-area="Administrator" asp-controller="Home" asp-action="Bulletin">
                            <i class="fa fa-undo"></i>
                            返回
                        </a>
                    </div>
                </div>
            </form>
        </div>
    </div>
</section>

@section scripts{
    <environment include="Development">
        <script src="~/javascript/template/module.js"></script>
        <script src="~/javascript/template/hotkeys.js"></script>
        <script src="~/javascript/template/uploader.js"></script>
        <script src="~/javascript/template/simditor.js"></script>
        <script src="~/javascript/view/Administrator/edit.js" asp-append-version="true"></script>
    </environment>

    <environment exclude="Development">
        <script src="~/javascript/view/Administrator/edit.min.js" asp-append-version="true"></script>
    </environment>
}